Imperative programming

Metadata
aliases: [Imperative programming language, Imperative programming languages, Imperative language]
shorthands: {}
created: 2022-07-10 22:21:38
modified: 2022-07-10 22:26:44

In imperative programming languages, we base our thinking around the idea of variables, which are changeable associations between a name and a value. Then we execute a sequence of commands on variables:

<command1>;
<command2>;
<command3>;
   ...

Assignment

Usually, each command is just an assignment in the form

<name> := <expression>

Where we change a variable's value by associating the result of the expression with a name.

The expression may refer to variables whose values were set by previous commands.